<div>
    <table class="table table-bordered P-MaterialGroupTable">
        <thead>
            <tr>
                <th v-for="item in head" class="tc w50pct">{{item}}</td>
            </tr>
        </thead>
        <tbody>
            <tr v-if="!data.length">
                <td>{{emptyText}}</td>
                <td></td>
            </tr>
            <tr v-for="item in data" v-bind:class="{'IsTemplate': item.IsTemplate}">
                <td>
                    <div v-for="sweety in item.Sweety" class="Sweety clear" v-bind:class="{'Border': $index}">
                        <div class="fl thumb">
                            <i class="uk-icon-times-circle cur_p close" v-bind:class="{'dn': hideMethod || item.IsTemplate}" v-on:click="vmRemove($parent.$index, $index, 1)"></i>
                            <img alt="缩略图" v-bind:src="sweety.smallThumb || default" class="cur-p" v-on:click="vmPreview(sweety.Cover)"/>
                        </div>
                        <div class="tl dib" v-bind:title="sweety.Name">
                            <label class="ml15 text-truncate w200 name">{{sweety.Name}}</label>
                        </div>
                    </div>
                    <div class="fr P-MaterialGroupIconAdd" v-bind:class="{'dn': hideMethod || item.IsTemplate}">
                        <i title="Add" class="uk-icon-plus-square cur-p font-primary" v-on:click="vmAddSweety($index)"></i>
                    </div>
                </td>
                <td>
                    <div class="P-MaterialGroupIcon tr" v-bind:class="{'dn': !item.IsFirst}">
                       {{item.Name}} <i class="uk-icon-times-circle cur_p Tclose" v-on:click="vmRemove($index, 0, 3)"></i>
                    </div>
                    <div v-for="whisky in item.Whisky" class="Sweety clear" v-bind:class="{'Border': $index}">
                        <div class="fl thumb">
                            <i class="uk-icon-times-circle cur_p close" v-bind:class="{'dn': hideMethod || item.IsTemplate}" v-on:click="vmRemove($parent.$index, $index, 2)"></i>
                            <img alt="缩略图" v-bind:src="whisky.smallThumb" class="cur-p" v-on:click="vmPreview(whisky.link)"/>
                        </div>
                        <div class="">
                            <label class="ml15 text-truncate w200 name">{{whisky.name}}</label>
                        </div>
                        <div class="">
                            <a class="ml15" target="_blank" v-bind:href="whisky.link">{{whisky.link}}</a>
                        </div>
                    </div>
                    <div class="fr P-MaterialGroupIconAdd" v-bind:class="{'dn': hideMethod || item.IsTemplate}">
                        <i title="Add" class="uk-icon-plus-square cur-p font-primary" v-on:click="vmAddWhisky($index)"></i>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <div class="mt10" v-bind:class="{'dn': hideMethod}">
        <span class="" pub-name="add" pub-mod="@base/common/input.button" pub-auth="materialGroup.add"/>
        <span class="" pub-name="addLine" pub-mod="@base/common/input.button" pub-auth="materialGroup.add"/>
        <span v-bind:class="{'dn': !canImport}" pub-name="ref" pub-mod="@base/common/input.button" pub-auth=""/>
        <span v-bind:class="{'dn': !canImport}" pub-name="copy" pub-mod="@base/common/input.button" pub-auth=""/>
        <span class="fr" v-bind:class="{'dn': !canSave}" pub-name="save" pub-mod="@base/common/input.button" pub-auth="materialGroup.add"/>
    </div>
</div>
